package com.google.android.wallet.sample.demo;

import com.google.android.wallet.sample.CallbackHandler;
import com.google.android.wallet.sample.SampleClientLib;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import android.support.v4.app.NavUtils;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final SampleClientLib lib = new SampleClientLib(this);
        findViewById(R.id.button1).setOnClickListener(new View.OnClickListener() {
            
            @Override
            public void onClick(View v) {
                lib.doStuff(new CallbackHandler(){

                    @Override
                    public void onSuccess() {
                        Toast.makeText(MainActivity.this, "Success!", Toast.LENGTH_LONG).show();
                    }

                    @Override
                    public void onFailure() {
                        Toast.makeText(MainActivity.this, "Failure...", Toast.LENGTH_LONG).show();                        
                    }
                    
                });
            }
        });
    }
    
}
